#!/usr/bin/python
# -*- encoding: utf-8 -*-
'''
@File    :   2.py
@Time    :   2020/04/20 15:20:06
@Author  :   Malygos_l 
@Version :   1.0
@Contact :   751756061@qq.com
@WebSite :   www.gitee.com/malygos_l
'''
# 写一个程序，从input.txt中读取之前输入的数据，存入列表中，再加上行号打印显示；
# Start typing your code from here

s = []
try:
    with open("homework3\input.txt","r") as f:
        for line in iter(f.readline,''):
            s.append(line.replace('\n',''))
        for a in s:
            print(a)
except IOError:
    print("ERROR!")

